#pragma once

#include <iostream>
#include <assert.h>
using namespace std;
// 任务类
class Task
{
public:
    Task() {    }
    Task(int a, int b, char op) : _a(a), _b(b), _op(op)
    {   }
    void Run()
    {
        int result = 0;
        if (_op == '+')
        {
            result = _a + _b;
        }
        else if (_op == '-')
        {
            result = _a - _b;
        }
        else if (_op == '*')
        {
            result = _a * _b;
        }
        else if (_op == '/')
        {
            assert(_b);
            result = _a / _b;
        }
        else 
        {
            assert(_b);
            result = _a % _b;
        }
        cout << _a << _op << _b << "=" << result << endl;
    }
    ~Task() {    }
private:
    int _a;
    int _b;
    char _op;
};